﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main/AdminPage.master" AutoEventWireup="true" CodeFile="NewsManage.aspx.cs" Inherits="Main_NewsManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="gvnews" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="Nid" 
            OnPageIndexChanging="gvnews_PageIndexChanging" OnRowCommand="gvnews_RowCommand" 
            PageSize="20" Width="680px">
        <Columns>
            <asp:TemplateField HeaderText="新闻标题">
                <ItemTemplate>
                    <asp:HyperLink ID="hltitle" runat="server" Target="_blank" 
                            Text='<%# Eval("Nmaintitle") %>' ToolTip='<%# Eval("Nmaintitle") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Tname" HeaderText="主题" />
            <asp:BoundField DataField="Mname" HeaderText="模块" />
            <asp:TemplateField HeaderText="时间">
                <ItemTemplate>
                    <asp:Label ID="labtime" runat="server" Text='<%# Eval("Ntime") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Nposter" HeaderText="发布者"/>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:HyperLink ID="hlupdate" runat="server">修改</asp:HyperLink>
                    <asp:LinkButton ID="lballow" runat="server" 
                        CommandArgument='<%# Eval("Nid") %>' CommandName="all">通过</asp:LinkButton>
                    <asp:LinkButton ID="lbdelete" runat="server" 
                            CommandArgument='<%# Eval("Nid") %>' CommandName="del">删除</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle CssClass="FooterStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <PagerStyle CssClass="PagerStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <SelectedRowStyle CssClass="SelectedRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <HeaderStyle CssClass="HeaderStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        <AlternatingRowStyle CssClass="AlternatingRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
    </asp:GridView>
</asp:Content>

